<?php

namespace App\Task;

use App\Model\VoiceCall;
use Hyperf\Crontab\Annotation\Crontab;

/**
 * 关闭当前正在拨打且超时的通话
 * @Crontab(name="CloseCallTask", rule="*\/28 * * * * *", callback="execute", memo="检测当前通话状态",singleton=false)
 */
class CloseCallTask extends CheckTaskBase
{
    /**
     * @return void
     */
    public function execute()
    {
        log_info(__CLASS__);
        $this->runClose(VoiceCall::CALL_TYPE);
    }
}
